import request from '@/utils/request'

// 查询明细列表
export function listOrderitems(query) {
  return request({
    url: '/result/orderitems/list',
    method: 'get',
    params: query
  })
}

// 查询测试样例详细
export function getOrderitems(id) {
  return request({
    url: '/result/orderitems/' + id,
    method: 'get'
  })
}

// 新增测试样例
export function addOrderitems(data) {
  return request({
    url: '/result/orderitems',
    method: 'post',
    data: data
  })
}

// 修改测试样例
export function updateOrderitems(data) {
  return request({
    url: '/result/orderitems',
    method: 'put',
    data: data
  })
}

// 删除测试样例
export function delOrderitems(id) {
  return request({
    url: '/result/orderitems/' + id,
    method: 'delete'
  })
}


/**
 * 生成guid
 * @returns {string}
 */
export function guid() {
  return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
    var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
    return v.toString(16);
  });
}
